### 分页模板函数，五个参数含义分别为：当前页、页大小，总页数，总行数，分页前方的链接
#define paginate(page,link,status)
#setLocal(currentPage=page.pageNumber,pageSize=page.pageSize,totalPage=page.totalPage,totalRow=page.totalRow,status=status)
#setLocal(pageLink = link+"status="+status+"&pageSize="+pageSize+"&pageNum=")
 
#setLocal(startPage = currentPage - 3)
#if(startPage < 1)
	#setLocal(startPage = 1)
#end
 
#setLocal(endPage = currentPage + 3)
#if(endPage > totalPage)
	#setLocal(endPage = totalPage)
#end
<meta charset="utf-8">

<div class="am-cf">
              共 #(totalRow) 条记录
<div class="am-fr" >
		<ul class="am-pagination">
		#if(currentPage == 1)
			<li class="am-disabled"><a href="javascript:void(0);">上页</a></li>
		#else
			<li><a href="#(pageLink)#(currentPage - 1)#(append)">上页</a></li>
		#end
		#if(currentPage - 3 > 1)
			<li><a href="#(pageLink)1#(append)">1</a></li>
		#end
		#if(currentPage > 6 && currentPage + 3 < totalPage)
			<li class="am-disabled"><a href="#">...</a></li>
		#end
		#for(i : [startPage..endPage])
			#if(currentPage == i)
				<li class="am-active"><a href="javascript:void(0);" class="current-page">#(i)</a></li>
			#else
				<li><a href="#(pageLink)#(i)#(append)">#(i)</a></li>
			#end
		#end
		
		#if(totalPage > 6 && currentPage + 3 < totalPage)
			<li><a href="#">...</a></li>
		#end
			
		#if(currentPage + 3 < totalPage)
			<li><a href="#(pageLink)#(totalPage)#(append)">#(totalPage)</a></li>
		#end
		#if(currentPage == totalPage)
			<li class="am-disabled"><a href="javascript:void(0);">下页</a></li>
		#else
			<li><a href="#(pageLink)#(currentPage + 1)#(append)">下页</a></li>	
		#end
		</ul>
</div>
</div>
#end